	function ativarCompoUf(){
		var campo = document.getElementById("mensagem");
		if(campo.value > 0){
			document.getElementById("divUf").style.display = 'block';
			}
		else{
			document.getElementById("divUf").style.display = 'none';
			}
	}

	function carregarCidades(){
		var uf = document.getElementById("uf");
		var msg = document.getElementById("mensagem");
		var tipo = document.getElementById("tipo");

		document.getElementById("idMenagem").value = msg.value;
		document.getElementById("siglaUfId").value = uf.value;
		document.getElementById("tipoId").value = tipo.value;
		document.forms[0].submit();
	}

	function carregarCidadesEdicao(){
		var uf = document.getElementById("uf");
		var tipo = document.getElementById("tipo");
		document.getElementById("siglaUfId").value = uf.value;
		document.getElementById("tipoId").value = tipo.value;
		
		document.forms[0].submit();
	}
	
	function carregarCidadesEtiqueta(){
		
		var uf = document.getElementById("uf");
		var cep = document.getElementById("cep");
		document.getElementById("ufSelecionadoId").value = uf.value;
		document.getElementById("cepId").value = cep.value;
		
		document.forms[0].submit();
		
	}
	
	function carregarDados(){
		var campo = document.getElementById("mensagem");
		var uf = document.getElementById("siglaUfId"); 
		if((uf != null && uf.value != null && uf.value != "")
			|| ( campo != null && campo.value > 0)){
				document.getElementById("divUf").style.display = 'block';
			}
		}

	function adicionarDest(){
		alert("entrou");
		var itens = document.getElementsByTagName("input");
		alert(itens.length);
	     for(var index = 0; index < itens; index++){
	          if(itens[index].type == "checkbox")
	              alert(itens[index].checked); //= objeto.checked;
	     }

		
	}
	
	function voltar(){
		history.back();
	}
	
	function mudarMenu(menu){
		
		if(menu == 1){
			document.getElementById("menuAdm").style.display = "block";
			document.getElementById("menuMensagem").style.display = "none";
			document.getElementById("menuMalaDireta").style.display = "none";
		}
		else if(menu == 2){
			document.getElementById("menuAdm").style.display = "none";
			document.getElementById("menuMensagem").style.display = "none";
			document.getElementById("menuMalaDireta").style.display = "block";
			
		}
		else if(menu == 3){
			document.getElementById("menuAdm").style.display = "none";
			document.getElementById("menuMensagem").style.display = "block";
			document.getElementById("menuMalaDireta").style.display = "none";
		}else{
			document.getElementById("menuAdm").style.display = "none";
			document.getElementById("menuMensagem").style.display = "none";
			document.getElementById("menuMalaDireta").style.display = "none";
		}
	}
	
	